﻿using System;

namespace maranov.SymlinkManager.ApplicationPrivilege
{
    /// <summary>
    /// Process elevation exception.
    /// </summary>
    public class ApplicationElevationException : Exception
    {
        /// <summary>
        /// Describes a process elevation exception.
        /// </summary>
        /// <param name="isAlreadyAdmin">
        /// Value of IsAlreadyAdmin parameter.
        /// </param>
        public ApplicationElevationException(bool isAlreadyAdmin)
        {
            IsAlreadyAdmin = isAlreadyAdmin;
        }

        /// <summary>
        /// If true, current application process is already running as Administrator
        /// yet the privilege check failed.
        /// </summary>
        public bool IsAlreadyAdmin
        {
            get;
            private set;
        }
    }
}
